package com.yimi.policyservice.dto.enums;

public enum ClientRusultEnum {

    E00000("E00000","操作成功"),
    E00001("E00000","操作失败"),
    E10004("E00000","登录用户不存在"),
    E10005("E10005","登录密码错误"),
    E20001("E20001","用户信息不存在"),
    E80001("E80001","未授权操作"),
    E80002("E80002","签名错误"),
    E80003("E80003","登录token校验失败"),
    E90001("E90001","系统错误");
    private String code ;
    private String message ;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }
    public static String getMessage(String code){
        ClientRusultEnum[] values = ClientRusultEnum.values();
        for(ClientRusultEnum clientRusultEnum:values){
            if(clientRusultEnum.getCode().equals(code)){
                return clientRusultEnum.getMessage();
            }
        }
        return "";
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private ClientRusultEnum(String code,String message) {
        this.code = code;
        this.message=message;
    }


}
